# -*- codeing = utf-8 -*-
# @Time : 2022/9/13 8:30
# @Author : 计科1814-16-徐澳
# @Software: PyCharm

'''
    list3=["张三","李四","王五","马六","吴七"]
    #①用户输入一个姓名，查询是否在列表中
    #②如果存在，输出它在列表中的位置
'''
list3=["张三","李四","王五","马六","吴七"]
print("-"*10,"姓名列表","-"*10)
for name in list3:
    print(name)
print("输入一个姓名，查询是否在列表中: ")
inputname = input()
if inputname in list3:
    print("%s是列表的第%d个元素"%(inputname,list3.index((inputname),0, len(list3)-1)+1))
else:
    print("输入的姓名不在列表中")
